public class Flower {
    public static void main(String[] args) {
        int sum=0;
        for (int i = 100; i <1000 ; i++) {
            int index=i;
            int digit=i%10;
            index/=10;
            int tenDigit=index%10;
            index/=10;
            int hrDigit=index%10;
            sum=(int)(Math.pow(digit,3)+Math.pow(tenDigit,3)+Math.pow(hrDigit,3));
            if(sum==i) System.out.println(i);
        }

    }
}
